﻿using System;
namespace CXedu.Model
{
	///<summary>
	///
	///</summary>
	public class GuestBook : ModelBase<int>
	{
		#region 成员字段
		
		private string _email = String.Empty;
		private string _name = String.Empty;
		private string _other = String.Empty;
		private string _phone = String.Empty;
		private string _qQ = String.Empty;
		private int _state = default(Int32);
		private DateTime _time = DateTime.Now;
		///<summary>
		///留言时间查询区间值
		///</summary>
		private DateTime[] _timespan = null;
		
		#endregion
		
		#region 构造方法
		
		public GuestBook() { }
		
		#endregion
		
		#region 成员方法
		
		public override int GetHashCode()
		{
			System.Text.StringBuilder sb = new System.Text.StringBuilder();
			sb.Append(this.GetType().FullName);
			sb.Append(_email);
			sb.Append(_name);
			sb.Append(_other);
			sb.Append(_phone);
			sb.Append(_qQ);
			sb.Append(_state);
			sb.Append(_time);
			return sb.ToString().GetHashCode();
		}
		
		#endregion
		
		#region 成员属性
		
		///<summary>
		///留言人Email
		///</summary>
		public string Email
		{
			get
			{
				return _email;
			}
			set
			{
				_email = value;
			}
		}
		///<summary>
		///留言人姓名
		///</summary>
		public string Name
		{
			get
			{
				return _name;
			}
			set
			{
				_name = value;
			}
		}
		///<summary>
		///备注
		///</summary>
		public string Other
		{
			get
			{
				return _other;
			}
			set
			{
				_other = value;
			}
		}
		///<summary>
		///留言人电话
		///</summary>
		public string Phone
		{
			get
			{
				return _phone;
			}
			set
			{
				_phone = value;
			}
		}
		///<summary>
		///留言人QQ
		///</summary>
		public string QQ
		{
			get
			{
				return _qQ;
			}
			set
			{
				_qQ = value;
			}
		}
		///<summary>
		///状态
		///</summary>
		public int State
		{
			get
			{
				return _state;
			}
			set
			{
				_state = value;
			}
		}
		///<summary>
		///留言时间
		///</summary>
		public DateTime Time
		{
			get
			{
				return _time;
			}
			set
			{
				_time = value;
			}
		}
		///<summary>
		///留言时间查询区间值
		///</summary>
		public DateTime[] Timespan{
			get
			{
				return _timespan;
			}
			set
			{
				_timespan = value;
			}
		}
		
        /// <summary>
        /// 自定义查询条件
        /// </summary>
        public string CustomWhere { get; set; }
		
		#endregion
	}
		
	public static class GuestBookHash
	{
		public const string TopNum = "TopNum";
		public const string OrderField = "OrderField";
		public const string OrderDirection = "OrderDirection";
		public const string Email = "Email";
		public const string Id = "Id";
		public const string Name = "Name";
		public const string Other = "Other";
		public const string Phone = "Phone";
		public const string QQ = "QQ";
		public const string State = "State";
		public const string Time = "Time";
		
        public const string CustomWhere = "CustomWhere";
	}
}